SetTrackVolume
TheSetTrackVolume
function allows your application to set a track's current volume.
pascal void SetTrackVolume (Track theTrack, short volume);
theTrack
- Specifies the track for this operation. Your application obtains this track identifier from such Movie Toolbox functions as
NewMovieTrack
andGetMovieTrack
(described on page 2-136 and page 2-188, respectively).volume
- Specifies the current volume setting of the track represented as a 16-bit, fixed-point number. The high-order 8 bits contain the integer part of the value; the low-order 8 bits contain the fractional part. Volume values range from -1.0 to 1.0. Negative values play no sound but preserve the absolute value of the volume setting.
kFullVolume
- Sets the track to full volume (constant value is 1.0).
kNoVolume
- Sets the track to no volume (constant value is 0.0).
DESCRIPTION
Note that, when the track is played, the track's volume is scaled by the volume setting of the movie that contains the track.ERROR CODES
invalidTrack -2009 This track is corrupted or invalid SEE ALSO
Your application can obtain the current volume setting by calling theGetTrackVolume
function, which is described in the next section.